﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="Detalle.aspx.cs" Inherits="BoxScore.jugador.Detalle" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="_jugador.ascx" tagname="_jugador" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
    <img src="../css/images/Ballpark_7.png" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">
<h2 class="title">Detalles del Jugador
    </h2>
    
    <uc1:_jugador ID="_jugador1" runat="server" />
    
    <br />
    
    
    <asp:UpdatePanel runat="server">
    
    <ContentTemplate>
    
    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"> 
    
    <asp:TabPanel runat="server" ID="ofensiva">
        <HeaderTemplate>
        Estadisticas Ofensivas
        
</HeaderTemplate>
        
        
<ContentTemplate>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:TemplateField HeaderText="Torneo / Equipo" SortExpression="nombre">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("nombre") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" 
                        NavigateUrl='<%# "~/Jugador/DetalleXTorneo.aspx?torneo="+ Request["torneo"] + "&jugador=" + Eval("id_player", "{0}") %>' 
                        Text='<%# Eval("nombre", "{0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="id" HeaderText="G" SortExpression="id" />
            <asp:BoundField DataField="ab" HeaderText="AB" SortExpression="ab" />
            <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
            <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
            <asp:BoundField DataField="h2" HeaderText="2H" SortExpression="h2" />
            <asp:BoundField DataField="h3" HeaderText="3H" SortExpression="h3" />
            <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
            <asp:BoundField DataField="rbi" HeaderText="RBI" SortExpression="rbi" />
            <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
<%--            <asp:BoundField DataField="ibb" HeaderText="IBB" SortExpression="ibb" />
--%>            <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
            <asp:BoundField DataField="sb" HeaderText="SB" SortExpression="sb" />
            <asp:BoundField DataField="average" HeaderText="AVG" DataFormatString=".{0:F0}" 
                SortExpression="average" />
            <asp:BoundField DataField="slugging" HeaderText="SLG" DataFormatString="{0:F3}" 
                SortExpression="slugging" />
        </Columns>
    </asp:GridView>


    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="getEstadisticasOfensivasByTournament" 
        TypeName="BoxScore.Model.BoxScoreBD">
        <SelectParameters>
            <asp:QueryStringParameter Name="idPlayer" QueryStringField="jugador" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

                    
        
</ContentTemplate>
    
    
</asp:TabPanel>
    
    <asp:TabPanel runat="server" ID="defensiva">
        <HeaderTemplate>
        Estadisticas Defensivas
        </HeaderTemplate>
        
        
<ContentTemplate>


    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource2">
        <Columns>
            <asp:TemplateField HeaderText="Torneo / Equipo" SortExpression="PlayerName">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("PlayerName") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink2" runat="server" 
                        NavigateUrl='<%# "~/jugador/DetalleXTorneo.aspx?jugador=" + Eval("idPlayer", "{0}") + "&torneo=" +Eval("id", "{0}") %>' 
                        Text='<%# Eval("PlayerName", "{0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="positionString" HeaderText="POS" 
                SortExpression="positionString" />
            <asp:BoundField DataField="g" HeaderText="G" SortExpression="g" />
            <asp:BoundField DataField="ip" HeaderText="INN" SortExpression="ip" />
            <asp:BoundField DataField="chances" HeaderText="C" 
                SortExpression="chances" />
            <asp:BoundField DataField="outs" HeaderText="O" SortExpression="outs" />
            <asp:BoundField DataField="a" HeaderText="A" SortExpression="a" />
            <asp:BoundField DataField="e" HeaderText="E" SortExpression="e" />
            <asp:BoundField DataField="dp" HeaderText="DP" SortExpression="dp" />
            <asp:BoundField DataField="pb" HeaderText="PB" SortExpression="pb" />
        </Columns>
        <EmptyDataTemplate>
            NO HAY DATOS CARGADOS PARA ESTE EQUIPO
        </EmptyDataTemplate>

    </asp:GridView>

    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        SelectMethod="getEstadisticasDefensivasByTournament" 
        TypeName="BoxScore.Model.BoxScoreBD">
        <SelectParameters>
            <asp:QueryStringParameter Name="idPlayer" QueryStringField="jugador" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

                    
        
</ContentTemplate>
    
    
</asp:TabPanel>
    
        <asp:TabPanel runat="server" ID="Pitcheo">
        <HeaderTemplate>
        Estadisticas Pitcheo
        
        
        
        
</HeaderTemplate>
        
        
<ContentTemplate>

                   <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource3">
        <Columns>
            <asp:TemplateField HeaderText="Torneo / Equipo" SortExpression="nombre">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("nombre") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink3" runat="server" 
                        NavigateUrl='<%# "~/jugador/DetalleXTorneo.aspx?jugador=" + Eval("id_player", "{0}") + "&torneo=" + Eval("id_game", "{0}") %>' 
                        Text='<%# Eval("nombre", "{0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="positionString" HeaderText="POS" 
                SortExpression="positionString" />
            <asp:BoundField DataField="w" HeaderText="W" SortExpression="w" />
            <asp:BoundField DataField="l" HeaderText="L" SortExpression="l" />
            <asp:BoundField DataField="average" HeaderText="ERA" 
                SortExpression="average" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="juego" HeaderText="G" SortExpression="juego" />
            <asp:BoundField DataField="cg" HeaderText="CG" SortExpression="cg" />
            <asp:BoundField DataField="savedgame" HeaderText="SV" 
                SortExpression="savedgame" />
            <asp:BoundField DataField="ip" HeaderText="INN" SortExpression="ip" />
            <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
            <asp:BoundField DataField="h2" HeaderText="H2" SortExpression="h2" />
            <asp:BoundField DataField="h3" HeaderText="H3" SortExpression="h3" />
            <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
            <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
            <asp:BoundField DataField="erun" HeaderText="ER" SortExpression="erun" />
            <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
            <%--<asp:BoundField DataField="ibb" HeaderText="IBB" SortExpression="ibb" />--%>
            <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
        </Columns>
        <EmptyDataTemplate>
            NO HAY DATOS CARGADOS PARA ESTE EQUIPO
        </EmptyDataTemplate>
    </asp:GridView>
    

    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
        SelectMethod="getEstadisticasPitcheoByTournament" 
        TypeName="BoxScore.Model.BoxScoreBD">
        <SelectParameters>
            <asp:QueryStringParameter Name="idPlayer" QueryStringField="jugador" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    
        
</ContentTemplate>
    
    
</asp:TabPanel>

    
    
    </asp:TabContainer>
        
    
    </ContentTemplate>
    
    </asp:UpdatePanel>
    

    
    
    


</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
